package com.oocl.ita.util;
import java.io.StringReader;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import org.dom4j.DocumentException;

import com.oocl.ita.po.Checks;
import com.oocl.ita.po.Shop;

public class CheckXMLUtil {
	
	public static Checks XMLToCheck(String xml) throws DocumentException{
		Checks checks = null;
		try {
			JAXBContext context = JAXBContext.newInstance(Checks.class);
			Unmarshaller unmarshaller;
			unmarshaller = context.createUnmarshaller();
			checks = (Checks)unmarshaller.unmarshal(new StringReader(xml)); 
		} catch (JAXBException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}  
         return checks;
	}
	
	
}
